import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class WelcomePage extends StatelessWidget {
  const WelcomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
              child: Image.asset('assets/images/farmer-copter.png')
          ),
          Expanded(
              child: Column(
                children: [
                  const Text('欢迎来到智慧农业~', style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold)),
                  Padding(
                    padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20),
                    child: RichText(
                        textAlign: TextAlign.center,
                        text: const TextSpan(
                            text: 'Read our',
                            style: TextStyle(
                                color: Colors.black,
                                height: 1.5
                            ),
                            children: [
                              TextSpan(
                                text: 'Privacy Policy',
                                style: TextStyle(
                                  color: Colors.blue,
                                ),
                              ),
                              TextSpan(
                                text: 'Tap "Aggree and continue" to accept the. ',
                              ),
                              TextSpan(
                                text: 'Terms of Services.',
                                style: TextStyle(
                                  color: Colors.blue,
                                ),
                              ),
                            ]
                        )
                    ),
                  ),
                  ElevatedButton(
                      onPressed: (){},
                      style: ElevatedButton.styleFrom(
                        backgroundColor: Colors.green,
                        foregroundColor: const Color(0xFF111B21),
                        splashFactory: NoSplash.splashFactory,
                        elevation: 0,
                        shadowColor: Colors.transparent,
                      ),
                      child: const Text('Agree and continue')
                  ),
                ],
              )
          ),
        ],
      )
    );
  }
}
